package com.dcy.quartz.convert;

import com.dcy.quartz.vo.in.JobChangeInVO;
import com.dcy.quartz.vo.in.JobCreateInVO;
import com.dcy.quartz.vo.in.JobSearchInVO;
import com.dcy.quartz.vo.in.JobUpdateInVO;
import com.dcy.quartz.vo.out.JobListOutVO;
import com.dcy.quartz.model.Job;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author：dcy
 * @Description:
 * @Date: 2020/12/17 8:47
 */
@Mapper
public interface JobConvert {

    JobConvert INSTANCE = Mappers.getMapper(JobConvert.class);

    Job toJob(JobSearchInVO jobSearchInVO);

    Job toJob(JobCreateInVO jobCreateInVO);

    Job toJob(JobUpdateInVO jobUpdateInVO);

    Job toJob(JobChangeInVO jobChangeInVO);

    JobListOutVO toOutput(Job job);

    List<JobListOutVO> toOutputList(List<Job> jobs);
}

